from flask import Blueprint, render_template
from flask_login import login_required, current_user
from applications.common.utils.admin_required import admin_required

admin_bp = Blueprint('admin', __name__, url_prefix='/admin')


# 首页
@admin_bp.get('/')
@admin_required(log=True)
def index():
    user = current_user
    return render_template('admin/index.html', user=user)


# 控制台页面
@admin_bp.get('/welcome')
@admin_required(log=True)
def welcome():
    return render_template('admin/console/console2.html')
